<template>
<div>
  <router-view></router-view>
  <!--  分割线-->
  <el-divider></el-divider>
  <!--查询全部客户信息-->
  <el-table
      ref="multipleTable"
      :data="tableData"
      border>
    <el-table-column
        prop="client"
        label="客户">
    </el-table-column>
    <el-table-column
        prop="clientUserCellPhoneNumber"
        label="联系电话">
    </el-table-column>
    <el-table-column
        prop="clientUserNumberUfwords"
        label="地区">
    </el-table-column>
    <el-table-column
        prop="clientUserState"
        label="是否指派">
    </el-table-column>
    <el-table-column
        prop="clientUserSenddate"
        label="入库日期">
    </el-table-column>
  </el-table>
  <!--    分页-->
  <el-pagination
      background
      layout="total, sizes, prev, pager, next"
      :page-sizes="[2, 4, 6, 8]"
      :total="pageData.total"
      :page-size="formInline.pageNum"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange">
  </el-pagination>
</div>
</template>

<script>
export default {
  name: "AdmmClientUserAll.vue",
  data(){
    return{
      tableData:[],
      pageData: {},// 存储返回的分页数据
      formInline:{
        pageId: 1,
        pageNum: 2,
        "chaxun":"1"
      }
    }
  },
  created() {
    this.getAdmmClientUser();
  },
  methods:{
//高级查询客户信息
    getAdmmClientUser() {
      this.$http
          .get("admmClientUser",
              {params: this.formInline})
          .then((res) => {
            this.tableData = res.data.data.list;
            this.pageData = res.data.data; // 返回的分页参数   pageinit
          })
          .catch(function (error) {
            console.log(error);
          });
    },
    //每页显示几条
    handleCurrentChange(val) {
      this.formInline.pageId = val; //动态改变
      this.getAdmmClientUser();
    },
    //显示几页
    handleSizeChange(val) {
      this.formInline.pageNum = val;
      this.getAdmmClientUser();
    },
  }
}
</script>

<style scoped>

</style>